package com.fengli.task.uitl.enumType;

/**
 * @Description: 该类用于设置Result的code
 * @Author: fengli
 * @Date 4/19/19 10:25 AM
 */
public enum Code {
    FAIL(500, "内部错误"), SUCCESS(200, "请求成功");

    private int code;
    private String msg;

    /**
     * 访问控制只能为private
     *
     * @param code
     * @param msg
     */
    private Code(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "Code{" +
                "code=" + code +
                '}';
    }}
